/**
 * <p>
 * 表格配置
 *
 * @Author：Roy
 * @Description：项目
 * @Date：Create by 2023-11-23 09:55:22
 */
const headerConfig = {
  'carouseImage': [
    {
      prop: 'id',
      name: '编号',
      minWidth: 110
    },
    {
      prop: 'name',
      name: '名称',
      minWidth: 110
    },
    {
      prop: 'logo',
      name: '图片',
      minWidth: 110,
      formatter(row) {
        if (row.logo != null) {
          return '<img style="width: 100px;height: 40px" alt="" src="' + row.logo + '"/>'
        }
        return ''
      }
    },
    {
      prop: 'positionName',
      name: '位置',
      minWidth: 120
    }, {
      prop: 'typeName',
      name: '类型',
      minWidth: 120
    },
    {
      prop: 'status',
      componentCell: 'CellSwitch',
      name: '状态',
      switchConfig: {
        activeCode: true,
        dataProp: 'status',
        activeName: '启用',
        inactiveCode: false,
        inactiveName: '禁用',
        switchPath: 'miniProgramCarouseImage.disabled',
        confirmHeader: '提示',
        confirmContent: '确定禁用，是否继续？',
        switchParamsProp: { id: 'id' }
      },
      minWidth: 120
    }, {
      prop: 'sort',
      name: '排序',
      minWidth: 100
    }, {
      prop: 'createTm',
      name: '创建时间',
      minWidth: 100
    },
    {
      name: '操作',
      width: 200,
      fixed: 'right',
      thStyle: { 'text-align': 'left' },
      operateList: [
        {
          type: 'btnText',
          label: '编辑',
          id: 'carouseImage-edit',
          authId: 'ecp-admin:miniProgramCarouseImage:update',
          config: { type: 'text' },
          // style: { color: 'rgb(66, 185, 131)' },
          hidden: (val) => {
            return false // !isHidden(['1'], val)
          }
        },
        {
          type: 'btnText',
          label: '删除',
          id: 'carouseImage-delete',
          authId: 'ecp-admin:miniProgramCarouseImage:deleteById',
          isMore: true,
          config: { type: 'text' },
          style: { color: '#ff0000' },
          hidden: (val) => {
            return false // !isHidden(['1'], val)
          }
        }
      ]
    }
  ]
}

export default {}
export { headerConfig }
